Method and system for video display with automatic reframing

ABSTRACT

A system and method are provided for displaying a video composed of images each comprising a predetermined number M of lines and, a predetermined number N of pixels in each line. Values of a predetermined number P of reference pixels for each line of a current image of the video are stored in memory, where P is less than N. For each line of the current image, the value of a parameter associated with the line is determined, with the parameter corresponding to the number of the reference pixels of the line that are black according to a first predetermined criterion. A first nonblack line and a last nonblack line of the current image are determined to serve as a basis for an automatic reframing of the images of the video before display. The first nonblack line of the current image is determined by excluding, starting from a first line of the image, the lines of the image which are black according to a second predetermined criterion based on the parameter, and the last nonblack line of the current image is determined by excluding, starting from a last line of the image, the lines of the image which are black according to the second predetermined criterion based on the parameter.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims priority from French PatentApplication No. 02-12233, filed Oct. 3, 2002, the entire disclosure ofwhich is herein incorporated by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to image processing, and more specificallyto systems and methods for displaying with automatic reframing a videoon a display screen such as a television screen.

2. Description of Related Art

The available display screens exhibit a predetermined screen ratio (alsoreferred to as the video format or aspect ratio or aspect format), thatis to say the width/height ratio of an image. For example, standardtelevisions have a screen ratio of 1.33:1 (4/3 or standardized format),that is to say they are 1.33 times as wide as they are high. Likewise,widescreen televisions have a screen ratio of 1.78:1 (16/9 or widescreenformat). Certain televisions may effect the display of imagesselectively according to one or the other of these formats, or evenaccording to other formats (in particular, for some, a 14/9 format).Moreover, certain more recent display devices, such as LCD (“LiquidCrystal Display”) or plasma screens, exhibit screen ratios of stilldifferent values.

Aside from this, the video images to be displayed have a screen ratiowhich may vary depending on the origin of the video. Thus, videosobtained via mass-market video cameras such as camcorders generally havea 4/3 format. On the other hand, films produced for television typicallyhave a 16/9 format. Furthermore, cinema films can have a screen ratio of2.35:1 (Cinemascope format) or of 1.85:1 (Panavision format, Vistavisionformat, etc.), for example.

Video broadcasting as standardized according to the recommendations ofthe ITU (International Telecommunication Union), formerly the CCIR(Comité Consultatif International des Radiocommunications), involves a4/3 format both for images having 525 lines and for those having 625lines. A cinema film, for example, is therefore processed according to a“Letterbox” technique which adds black bands at the top and bottom ofthe original images (without modifying them), so that the imagesbroadcast are displayed without distortion on a standard television (4/3format).

FIG. 1 shows an example of an image thus processed so as to allowbroadcast according to the aforesaid recommendations of the ITU. Such animage is said to be in the “Letterbox” format. In the example shown, theouter box 1 corresponds to the 4/3 format image, and the inner box 2corresponds to the 16/9 format image, that is to say to the activevideo. The difference between these two images resides in the upperhorizontal black band 3 and lower horizontal black band 4.

The need exists for a process that makes it possible to automaticallydetect the format of a video to be displayed, so as to adjust thedisplay parameters in such a way as to optimize the display. Such aprocess could be used to implement a reframing of the images received inthe “Letterbox” format, for example a zoom, so that the active video isdisplayed in full screen mode on a 4/3 format screen, that is to saywithout having horizontal black bands appear.

For this purpose, it is known to detect the upper and lower black linesof the video image, according to various methods that have beenproposed. This amounts to detecting the active video within the video.

These known methods nevertheless exhibit insufficient accuracy, in thesense that the detection of the black lines may be deficient in acertain number of situations, depending on the content of the images.Moreover, the known methods exhibit limitations in terms of flexibility(e.g., no possibility of changes) as well as a higher cost when they areimplemented in hardware.

SUMMARY OF THE INVENTION

In view of these drawbacks, it is an object of the present invention toovercome the above-mentioned drawbacks and to provide an improved systemand process for automatically detecting the format of a video to bedisplayed.

Another object of the present invention is to provide a system andprocess for reframing of images received in “Letterbox” format so thatthe active video is displayed in full screen mode.

According to a first aspect, the present invention proposes a method fordisplaying a video composed of images each comprising a predeterminednumber M of lines and, a predetermined number N of pixels in each line,where M and N are integers. According to the method, values of apredetermined number P of reference pixels for each line of a currentimage of the video are stored in memory, where P is an integer that isless than N. For each line of the current image, the value of aparameter associated with the line is determined, with the parametercorresponding to the number of the reference pixels of the line that areblack according to a first predetermined criterion. A first nonblackline and a last nonblack line of the current image are determined toserve as a basis for an automatic reframing of the images of the videobefore display. The first nonblack line of the current image isdetermined by excluding, starting from a first line of the image, thelines of the image which are black according to a second predeterminedcriterion based on the parameter, and the last nonblack line of thecurrent image is determined by excluding, starting from a last line ofthe image, the lines of the image which are black according to thesecond predetermined criterion based on the parameter.

According to a second aspect, the present invention proposes a systemfor displaying a video composed of images each comprising apredetermined number M of lines, and a predetermined number N of pixelsin each line, where M and N are integers. The system includes a memory,first means, and second means. The memory stores values of apredetermined number P of reference pixels for each line of a currentimage of the video, where P is an integer that is less than N. The firstmeans determines, for each line of the current image, the value of aparameter associated with the line, the parameter corresponding to thenumber of the reference pixels of the line that are black according to afirst predetermined criterion, and determines a first nonblack line ofthe current image by excluding, starting from a first line of the image,the lines of the image which are black according to a secondpredetermined criterion based on the parameter, and determines a lastnonblack line of the current image by excluding, starting from a lastline of the image, the lines of the image which are black according tothe second predetermined criterion based on the parameter. The secondmeans automatically reframes the current image before display based on afirst nonblack line and a last nonblack line.

Advantageously, the sub-sampling of the image which results from theconsideration of only the reference pixels gives better results for thedetection of the black bands. Another advantage of the present inventionis that it can be implemented in software form, so that changes arepossible at less cost. Furthermore, the fact that only some of thepixels of the image are processed (namely, the reference pixels)decreases the number of calculations and the resources required.

Other objects, features and advantages of the present invention willbecome apparent from the following detailed description. It should beunderstood, however, that the detailed description and specificexamples, while indicating preferred embodiments of the presentinvention, are given by way of illustration only and variousmodifications may naturally be performed without deviating from thepresent invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram illustrating an image in the “Letterbox” format;

FIG. 2 is a block diagram of a video display system according to oneembodiment of the present invention;

FIG. 3 is a flow chart illustrating a display process according to oneembodiment of the present invention;

FIG. 4 is a flow chart showing in detail an exemplary process fordetection of the active video in an image in accordance with anembodiment of the present invention;

FIG. 5 is a diagram illustrating a first exemplary distribution of thereference pixels in a line of the image; and

FIG. 6 is a diagram illustrating a second exemplary distribution of thereference pixels in a line of the image.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

Preferred embodiments of the present invention will be described indetail hereinbelow with reference to the attached drawings.

In the following description, the term “image” is used generically todesignate either a video image or a video frame. Moreover, in accordancewith the jargon of a person of ordinary skill in the art, “active video”designates the portion of an image which carries the action, that is tosay which goes from the first to the last video line which are not blacklines.

The words such as “first”, “last”, and “next”, when they pertain tolines of the image, are here conventionally used with reference to theorder of transmission of the information coding the video lines,according to which of the video lines of each image are transmitted insuccession commencing with the top line and finishing with the bottomline of the image. It will be noted that this convention is not affectedby the fact that the video lines are generally transmitted withinterlacing, that is to say in two fields for one image. A fieldcorresponds to one of the two halves of an image in an interlaceddisplay system, a first half of the image being constituted by the oddlines and a second half being constituted by the even lines.

FIG. 2 is a block diagram of a display system according to oneembodiment of the present invention. Such a system forms, for example,part of a standard television, a widescreen television or the like.

The system 10 comprises an input 11 for receiving an input video signalVIDEO_IN. Such a signal is, for example, the signal delivered by thetuner of the television. It is a coded signal which represents the videoto be displayed. The signal VIDEO_IN is input to a decoder circuit 12,which carries out the decoding of the signal.

In the example considered here, the original video is coded inaccordance with the ITU-R BT.601 standard of the ITU (the standardformerly known as CCIR 601), which is the standard for in-studio codingof digital television for 4/3 (standardized) and 16/9 (widescreen) imageformats. This standard prescribes a processing of the videocomponent-wise, that is to say using three components for the coding ofthe pixels. In this example, a coding of the pixels in the Y Cb Crcolorimetric system is considered. In this system, Y denotes, for apixel, the luminance component which corresponds to a black and whitesignal, and Cb and Cr denote the chrominance components which areindependent of the luminance and correspond to color difference signals,respectively between the luminance and the blue color and between theluminance and the red color.

While the Y Cb Cr calorimetric system and a certain standard are used inthis example, the present invention is in no way limited to thisexample. For example, the component-wise coding of the pixels can be acoding in the RGB (Red, Green, Blue) calorimetric system which gives arepresentation of a pixel by the combination of the values of threecolor components, namely red, green and blue.

As shown, the data output by the decoder 12 is stored temporarily in amemory 13. This memory is dubbed the “field memory” since the data of animage is advantageously stored per field. Current practice with respectto analog broadcast television actually consists in transmitting twofields per image in succession since the display standards in forcecorrespond to an interlaced display (the odd lines are displayed via afirst scan of the screen, then the even lines are displayed via a secondscan). Nevertheless, certain digital transmission systems provide forframe-wise transmission, with a frame corresponding to a complete image.

The capacity of the memory 13 is such that it can store as a minimum thepixel values of a field.

The process of the present invention can be implemented with the formatof the video source being either analog or digital. For analog images,the pixel values can, for example, be stored in “raster” fashion. Forthe digital images (coming from an MPEG decoder, for example), they canbe stored in “macroblock” fashion.

A control circuit 14 can read-access the pixel values stored in thememory 13. The circuit 14 comprises a module 15 for detecting blackbands in a current image to be displayed, and a module 16 which controlsthe reframing and the display of the current image.

The control circuit 14 drives a screen 17 such as a CRT screen (“CathodeRay Tube”), an LCD screen or a plasma screen.

The control circuit 14 is, for example, a microprocessor driven by anapplication program stored permanently in a memory (such as the memory13). Such a microprocessor is already present in most televisionscurrently sold. As a variant, the control circuit may be a correctlyprogrammed microcontroller. In both cases, the modules 15 and 16 arepreferably embodied in the form of software units. As another variant,the control circuit 14 may be a dedicated integrated circuit, or anassemblage of hardware components and/or of software units designedspecially for the implementation of the present invention. For example,the module 16 can be embodied in the form of a piece of hardware drivenby a microprocessor or microcontroller.

FIG. 3 is a flow chart of a display process according to one embodimentof the present invention.

In step 31, a video frame, that is to say the data coding an entirecurrent image, is received on the input 11. This data is decoded by thedecoder 12.

In step 32, the values of at least some of the pixels of the image arestored in the memory 13. Only the values of some pixels of the image,referred to below as the reference pixels, are required for theimplementation of the present invention. This is why, preferably, onlythe values of these reference pixels are stored in the memory 12.Nevertheless, it is also possible to store in memory the value of allthe pixels of the image. In an application where all the pixels of theimage are systematically stored in the field memory of the television,the implementation of the present invention does not involve anyadditional need in terms of storage capacity. In this example, thevalues of the components Y, Cb and Cr associated with each pixelconsidered are stored in the memory 13.

In step 33, the detection of the black bands in the image is carriedout. This step is implemented by the module 15 of the control circuit14. Its aim is to determine the first line ULi and the last line BLi ofthe active video of the current image, that is to say the first and thelast line of the current image which are not black lines. The detail ofan exemplary implementation of this step 33 is given hereinbelow withreference to the flow chart of FIG. 4.

For this exemplary implementation of the detection of the active image,two indices m and p are defined which make it possible to tag thereference pixels denoted Px(m,p). The index m is an integer lyingbetween 1 and M, where M is an integer which denotes the number of videolines of the image. The index p is an integer lying between 1 and P,where P is an integer which denotes the number of reference pixels ineach line. The number P is less than a predetermined number N, which isan integer which denotes the number of pixels constituting each line ofthe image.

For each line of index m of the image, that is to say for m lyingbetween 1 and M, a parameter SUM(m) is defined which corresponds to thenumber of reference pixels from among the pixels Px(m,1) to Px(m,P)which are (regarded as) black according to a first predeterminedcriterion. The higher this parameter, the more the line may be regardedas black. This is why a second criterion is also defined which makes itpossible to regard a line as black or nonblack, with this secondcriterion being based on the parameter SUM(m) associated with the lineconsidered.

As shown in FIG. 4, in a first group of steps 41 to 48, the value of theparameter SUM(m) associated with each line of index m is determined,with m ranging from 1 to M. In steps 51 to 54, the first nonblack lineof the current image is determined, by exclusion of the lines which are(regarded as) black (according to the aforesaid second criterion) whenthe lines of the image are examined in succession starting from thefirst line of the image. In steps 61 to 64, the last nonblack line ofthe current image is determined, by exclusion of the lines which areregarded as black when the lines of the image are examined in successionstarting from the last line of the image.

More specifically, in initialization steps 41 and 42, the indices m andp, respectively, are initialized to unity (m=1, p=1).

In step 43, it is determined whether the reference pixel Px(m,p) may beregarded as black according to the first aforesaid criterion. In anadvantageous embodiment, when the video is a color video represented asluminance and chrominance components, this first criterion takes intoaccount the luminance component and, preferably, also the value orvalues of the chrominance components of the pixels. In this example, thefirst criterion thus includes the comparison of the value of theluminance component Y with predetermined thresholds (luminancethresholds). In an advantageous embodiment, it furthermore includes thecomparison of the chrominance component Cb and/or of the chrominancecomponent Cr with other predetermined thresholds (chrominancethresholds).

If the pixel Px(m,p) is regarded as black, then in step 44, theparameter SUM(m) is incremented by one unit and the process then goes tostep 45. In the converse case, the process goes directly to step 45.

In step 45, it is determined whether all the reference pixels of theline of index m have been examined, by comparing the value of the indexp with the number P. If p is equal to P then the process goes to step47. In the converse case, the process goes to step 46 in which the indexp is incremented by one unit and then goes back to step 43.

In step 47, it is determined whether all the lines of the image havebeen examined, by comparing the value of the index m with the value M.If m is equal to M, then the evaluation of the parameter SUM(m) has beenterminated for all the lines of the image. In the converse case, theindex m is incremented by one unit in step 48, and the process goes backto initialization step 42.

An exemplary implementation of steps 41 to 48 described above, in theform of code lines of a computer program (“pseudo-code”), is as follows.

FOR m = 1 TO M FOR p = 1 TO P IF ( y(m,p)<BLACK_LEVEL_LUMA + S1) and ((BLACK_LEVEL_CHROMA-S1’ < cb(m,p) < BLACK_LEVEL_CHROMA + S1’) or(BLACK_LEVEL_CHROMA-S1’ < cr(m,p) < BLACK_LEVEL_CHROMA + S1’) ) THEN SUM(m) = SUM (m) + 1 END IF END FOR END FOR

In this exemplary implementation, y(m,p), cb(m,p) and cr(m,p) are thevalues of the components of the pixel Px(m,p) in the Y Cb Crcolorimetric system;

BLACK_LEVEL_LUMA is the luminance level corresponding to the black color(10h according to the CCIR 601 recommendation);

BLACK_LEVEL_CHROMA is the chrominance level corresponding to the blackcolor (80h according to the CCIR 601 recommendation); and

S1 and S1′ are fixed values which, in combination with theBLACK_LEVEL_LUMA and BLACK_LEVEL_CHROMA levels, respectively, define theluminance thresholds and the chrominance thresholds, respectively, whichwere presented above. The first luminance thresholds areBLACK_LEVEL_LUMA−S1 and BLACK_LEVEL_LUMA+S1. The first chrominancethresholds are BLACK_LEVEL_CHROMA−S1′ and BLACK_LEVEL_CHROMA+S1′. Inthis example, the values S1 and S1′ are equal to 5h and 10hrespectively.

A second group of steps 51 to 54 is used to determine the top lines ofthe image which may be regarded as black according to the secondaforesaid criterion, and to deduce therefrom the index ULi of the firstline of the active image (that is to say the first nonblack line) of thecurrent image, so as to serve as a basis for an automatic reframing (or“pan and scan”) of the images before display.

In an initialization step 51, the values of the index ULi and the indexm are initialized to unity (m=1).

In step 52, it is then determined whether the value of the parameterSUM(m) is greater than a predetermined threshold S2. In this example,the threshold S2 is equal to

$\frac{3}{4} \times {P.}$Nevertheless, any value between

$\frac{1}{2} \times P$and P can be used. Specifically, as soon as SUM(m) is greater than

${\frac{1}{2} \times P},$the probability that the line is black is higher than the probabilitythat it is nonblack.

If SUM(m) is greater than S2, the line of index m is regarded as black.Then, in step 53, the index m is incremented by one unit, and theprocess goes back to step 52. In the converse case, the line of index mis regarded as nonblack. It is then the first nonblack line of theimage. Then, in step 54, the value ULi thus obtained is stored inmemory.

An exemplary implementation of steps 51 to 54 described above, in theform of code lines of a computer program (“pseudo code”), is as follows.

-   m=1-   ULi=1-   WHILE (SUM(m)>S2)    -   ULi=ULi+1    -   m=m+1-   END WHILE

In a group of steps 61 to 64, which may be carried out after, before, orconjointly with the aforesaid steps 51 to 54, the bottom lines of theimage which may be regarded as black according to the same predeterminedcriterion or according to a similar criterion are determined, and it isdeduced therefrom the last line of the active video (that is to say thelast nonblack line of the image) to serve as a basis for the reframingof the image.

In an initialization step 61, the values of the index BLi and the indexm are initialized to the value M.

In step 62, the value of the parameter SUM(m) is compared with theaforesaid threshold S2 (or with a threshold that may be different). IfSUM(m) is greater than S2, then the line of index m is regarded asblack. Then, in step 63 the index m is decremented by one unit. Theprocess returns thereafter to step 62. In the converse case, the line ofindex m is regarded as nonblack. More particularly, it is then the lastnonblack line of the image, that is to say the last line of the activevideo. Then, in step 64, the value BLi is stored in memory.

An exemplary implementation of steps 61 to 64 described above, in theform of code lines of a computer program (“pseudo code”), is as follows.

-   m=M-   BLi=M-   WHILE (SUM(m)>S2)    -   BLi=BLi−1    -   m=m−1-   END WHILE

Once the first nonblack line ULi and the last nonblack line BLi whichhave been determined for the current image are known, it would bepossible to perform a reframing of the current image before its displayby taking the lines ULi and BLi into account. However, for reasons whichwill become apparent, a series of tests is preferably performed todetermine whether it is appropriate to modify values ULi−1 and BLi−1denoting the upper limit and the lower limit, respectively, of theactive video, which were determined earlier with respect to thereframing of the images. The values ULi−1 and BLi−1 correspond to therespective indices of the first nonblack line and of the last nonblackline of an earlier image. This earlier image is not necessarily theprevious image (the terms “earlier” and “previous” being employed herewith reference to the order of broadcasting of the images of the video).

Returning to FIG. 3, one or more of the tests of steps 34, 35 and 36 areperformed, after the step 33 of detecting the active video.

In step 34, it is determined whether the average luminance of thecurrent image is greater than a threshold S3. The average luminance ofthe image is preferably determined on the basis of the luminance valuey(m,p) of the M×P reference pixels, respectively Px(m,p) with m rangingfrom 1 to M, and p ranging from 1 to P. As a variant, it is alsopossible to compute an average by taking into account all the pixels ofthe image, although the calculation of this average is then lengthier.In this example, the value of the threshold S3 is equal to 25h, withthis value corresponding to a tenth of the luminance swing in the caseof a video in accordance with the CCIR 601 recommendation. If theaverage luminance of the image is less than this threshold, thedeterminations of black/nonblack lines performed in step 33 may beregarded as exhibiting a high probability of being erroneous. Such isthe case for example with an image corresponding to a very dark scene(for example action which unfolds at night).

In step 35, it is determined whether the distance between the lines ULiand BLi, which were detected in step 33, and the lines ULi−1 and BLi−1,which were determined with respect to the last image reframingperformed, is less than a predetermined threshold. Specifically, if thisdistance is insignificant, then it is unnecessary to proceed with anupdating of the values ULi−1 and BLi−1 which are determined for thereframing of the images. This thus avoids overly frequent zooms whichmight cause an image jerk effect which is unpleasant for the user.

With a similar aim, in step 36 it is determined whether the newdimensions of the active video, which are defined by the lines ULi andBLi, have been with a certain stability for the previous K images, whereK is an integer. Stated otherwise, in step 36 it is determined whetherthe distance between the first nonblack line and the last nonblack lineof the current image, and the first nonblack line and the last nonblackline, respectively, of each of the previous K images, is less than apredetermined threshold. In this example, K is equal to 10.

If the response to at least one of the tests of steps 34, 35 and 36 isnegative, then the current image is reframed, in step 38, and thendisplayed, in step 39, without first updating the values ULi−1 andBLi−1. In the converse case, the indices of the lines ULi−1 and BLi−1are replaced with those of the lines ULi and BLi respectively, in step37. Thereafter, a reframing of the image is performed in step 38, andthe process then goes to step 39 where the reframed image is displayed.The reframing of step 38 is typically a zoom, which may be a zoom-in(corresponding to an enlarging of the image) or a zoom-out(corresponding to a diminishing of the image), on the basis of the upperand lower limits of the active video ULi−1 and BLi−1.

FIG. 5 and FIG. 6 respectively are a first and a second exemplarydistribution of the reference pixels in each line of the image. Thelines of the image 1 are represented in disjoint fashion in the form ofthick horizontals for the lines of the upper and lower black bands 3 and4, and in the form of thin horizontals for the lines of the active image2. The reference pixels Px are represented by points. In the examplesshown in FIGS. 5 and 6, the distribution of the reference pixels Px(m,1)to Px(m,P) of the line of index m is the same whatever the value of theindex m. Stated otherwise, the distribution of the reference pixels in aline is the same for all the lines. The reference pixels Px aretherefore distributed within the image by being disposed alongpredetermined columns C(1) to C(P), with each of these columnscomprising one pixel Px per line. This constitutes a nonlimiting examplewhich has the advantage of simplifying the implementation of the presentinvention.

In the example illustrated by FIG. 5, the distribution of the Preference pixels Px in each line is substantially uniform. Statedotherwise, the columns C(1) to C(P) are substantially evenly spaced.

This configuration makes it possible to not neglect any part of theimage with respect to the others.

In the example illustrated by FIG. 6, the distribution of the Preference pixels Px in each line is nonuniform. In this example, morepixels Px are situated at the center of the line than at the left and/orright ends of the line. Stated otherwise, the columns C(1) to C(P) areconcentrated towards the middle of the image, with their density therebeing larger than towards the left edge and the right edge of the image.

This configuration makes it possible to reduce the probability that aline of black bands 3 and 4 into which a logo (for example the logo ofthe producer of the images) might be inlaid is regarded as a nonblackline. It is indeed customary for the producer of images to exploit theblack bands in order to insert his logo for advertising purposes. Thislogo is generally situated at the top left, at the top right, at thebottom left or at the bottom right of the images, at least in partwithin the black bands. This logo is of no visual interest to the userand it is preferable to regard the lines which contain it as being blacklines.

Moreover, this configuration makes it possible to minimize theprobability that lines containing subtitles are regarded as black linesand eliminated from the displayed image on account of the reframing ofthe image. Specifically, such subtitles are conventionally contained inthe middle of the bottom lines of the image, and appear as white oryellow color characters (letters, digits, or the like), and in all caseshave high luminance.

According to an advantageous exemplary implementation, the step 33 ofdetecting the black bands terminates with a step of detecting subtitlesin the bottom black lines of the image, from the values of the referencepixels belonging to these black lines. This step involves, for example,determining, among the (M−BLi)×P reference pixels belonging to the linesof the lower black band 4, the number of those whose value of luminancecomponent y(m,p) is greater than a predetermined WHITE_LEVEL threshold.In this example, the value of the WHITE_LEVEL threshold is equal toaround 200h. If this number is greater than a predetermined percentageof the number (M−BLi)×P, for example 2%, the probability of havingsubtitles in the band 4 is regarded as considerable. In this case, thevalue BLi determined in step 33, which corresponds to the index of thelast nonblack line, is replaced with the value M which corresponds tothe index of the last line of the image. In this way, the imagedisplayed is reframed before display, in the case of detection ofsubtitles, on the basis of the first nonblack line and of the last lineof the image. Stated otherwise, the lower band 4 containing thesubtitles is displayed.

According to another advantageous exemplary implementation, the layout(or locations) of the reference pixels in the image varies over time,for example from one image to another. This variation can consist incausing the place of the columns containing reference pixels to changewhen the reference pixels are disposed in predetermined columns of theimage. Stated otherwise, the sampling of the image by the referencepixels is dynamic instead of being static.

In this way, more pixels of the image are taken into account over time(in several successive images of the video). For example, it may becontrived in such a way that all the pixels of the image are referencepixels in at least some of the images of the video. In this way, theprobability of false detection of black lines is reduced. The process isthus rendered more robust, and is not stumped by specific videos, inparticular static videos (such as a test card).

The variation in the layout of the reference pixels may be random orperiodic, for example it may vary with each image, or every X images,where X is a predetermined integer.

The present invention can be implemented in hardware, software, or acombination of hardware and software. Any processor, controller, orother apparatus adapted for carrying out the functionality describedherein is suitable. A typical combination of hardware and software couldinclude a general purpose microprocessor (or controller) with a computerprogram that, when loaded and executed, carries out the functionalitydescribed herein.

The present invention can also be embedded in a computer programproduct, which comprises all the features enabling the implementation ofthe methods described herein, and which—when loaded in an informationprocessing system—is able to carry out these methods. Computer programmeans or computer program in the present context mean any expression, inany language, code or notation, of a set of instructions intended tocause a system having an information processing capability to perform aparticular function either directly or after either or both of thefollowing a) conversion to another language. Such a computer program canbe stored on a computer or machine readable medium allowing data,instructions, messages or message packets, and other machine readableinformation to be read from the medium. The computer or machine readablemedium may include non-volatile memory, such as ROM, Flash memory, Diskdrive memory, CD-ROM, and other permanent storage. Additionally, acomputer or machine readable medium may include, for example, volatilestorage such as RAM, buffers, cache memory, and network circuits.Furthermore, the computer or machine readable medium may comprisecomputer or machine readable information in a transitory state mediumsuch as a network link and/or a network interface, including a wirednetwork or a wireless network, that allow a device to read such computeror machine readable information.

While there has been illustrated and described what are presentlyconsidered to be the preferred embodiments of the present invention, itwill be understood by those skilled in the art that various othermodifications may be made, and equivalents may be substituted, withoutdeparting from the true scope of the present invention. Additionally,many modifications may be made to adapt a particular situation to theteachings of the present invention without departing from the centralinventive concept described herein. Furthermore, an embodiment of thepresent invention may not include all of the features described above.Therefore, it is intended that the present invention not be limited tothe particular embodiments disclosed, but that the invention include allembodiments falling within the scope of the appended claims.

1. A method for displaying a video composed of images each comprising apredetermined number M of lines and, a predetermined number N of pixelsin each line, where M and N are integers, the method comprising thesteps of: storing in memory values of a predetermined number P ofreference pixels for each line of a current image of the video, where Pis an integer that is less than N; determining, for each line of thecurrent image, the value of a parameter associated with the line, theparameter corresponding to the number of the reference pixels of theline that are black according to a first predetermined criterion; anddetermining a first nonblack line and a last nonblack line of thecurrent image to serve as a basis for an automatic reframing of theimages of the video before display, the first nonblack line of thecurrent image being determined by excluding, starting from a first lineof the image, the lines of the image which are black according to asecond predetermined criterion based on the parameter, and the lastnonblack line of the current image being determined by excluding,starting from a last line of the image, the lines of the image which areblack according to the second predetermined criterion based on theparameter.
 2. The method according to claim 1, wherein a distribution ofthe reference pixels in at least one of the lines is substantiallyuniform.
 3. The method according to claim 1, wherein a distribution ofthe reference pixels in at least one of the lines is nonuniform, withmore reference pixels being located near the center of the line than atthe left and/or right ends of the line.
 4. The method according to claim1, wherein a distribution of the reference pixels is the same for all ofthe lines of the current image.
 5. The method according to claim 1,wherein locations of the reference pixels vary over time.
 6. The methodaccording to claim 1, wherein the video is a color video represented asluminance and chrominance components, and the first criterion includescomparing a value of the luminance component of the reference pixel withat least one predetermined threshold.
 7. The method according to claim6, wherein the second criterion includes comparing a value of theparameter with a predetermined threshold.
 8. The method according toclaim 1, wherein the video is a color video represented as luminance andchrominance components, and the first criterion includes comparing avalue of the luminance component of the reference pixel with at leastone first predetermined threshold, and comparing a value of at least onechrominance component of the reference pixel with at least one secondpredetermined threshold.
 9. The method according to claim 1, wherein thesecond criterion includes comparing a value of the parameter with apredetermined threshold.
 10. The method according to claim 1, furthercomprising a step of reframing the current image before display either:on the basis of the first nonblack line and the last nonblack line ofthe current image, or on the basis of the first nonblack line and thelast nonblack line of an earlier image of the video if at least one ofone or more conditions is not achieved.
 11. The method according toclaim 10, wherein the one or more conditions include first, second andthird conditions, the first condition is that an average luminance ofthe current image is less than a predetermined threshold, the secondcondition is that a distance between the first nonblack line and thelast nonblack line of the current image, and the first nonblack line andthe last nonblack line of the earlier image is less than a firstpredetermined threshold, and the third condition is that a distancebetween the first nonblack line and the last nonblack line of thecurrent image, and the first nonblack line and the last nonblack line ofeach of K previous images, is less than a second predeterminedthreshold, where K is a predetermined integer.
 12. The method accordingto claim 1, further comprising a steps of: detecting subtitles in theblack lines at the bottom of the image; and if subtitles are detected,reframing the current image before display on the basis of the firstnonblack line and the last line of the image.
 13. A machine-readablemedium encoded with a program for displaying a video composed of imageseach comprising a predetermined number M of lines and, a predeterminednumber N of pixels in each line, where M and N are integers, the programcontaining instructions for performing the steps of: storing in memoryvalues of a predetermined number P of reference pixels for each line ofa current image of the video, where P is an integer that is less than N;determining, for each line of the current image, the value of aparameter associated with the line, the parameter corresponding to thenumber of the reference pixels of the line that are black according to afirst predetermined criterion; and determining a first nonblack line anda last nonblack line of the current image to serve as a basis for anautomatic reframing of the images of the video before display, the firstnonblack line of the current image being determined by excluding,starting from a first line of the image, the lines of the image whichare black according to a second predetermined criterion based on theparameter, and the last nonblack line of the current image beingdetermined by excluding, starting from a last line of the image, thelines of the image which are black according to the second predeterminedcriterion based on the parameter.
 14. The machine-readable mediumaccording to claim 13, wherein the video is a color video represented asluminance and chrominance components, and the first criterion includescomparing a value of the luminance component of the reference pixel withat least one predetermined threshold.
 15. The machine-readable mediumaccording to claim 13, wherein the second criterion includes comparing avalue of the parameter with a predetermined threshold.
 16. Themachine-readable medium according to claim 13, wherein the programfurther contains instructions for performing the step of reframing thecurrent image before display either: on the basis of the first nonblackline and the last nonblack line of the current image, or on the basis ofthe first nonblack line and the last nonblack line of an earlier imageof the video if at least one of one or more conditions is not achieved.17. The machine-readable medium according to claim 13, wherein theprogram further contains instructions for performing the steps of:detecting subtitles in the black lines at the bottom of the image; andif subtitles are detected, reframing the current image before display onthe basis of the first nonblack line and the last line of the image. 18.A system for displaying a video composed of images each comprising apredetermined number M of lines, and a predetermined number N of pixelsin each line, where M and N are integers, the system comprising: amemory for storing values of a predetermined number P of referencepixels for each line of a current image of the video, where P is aninteger that is less than N; first means for determining, for each lineof the current image, the value of a parameter associated with the line,the parameter corresponding to the number of the reference pixels of theline that are black according to a first predetermined criterion, andfor determining a first nonblack line of the current image by excluding,starting from a first line of the image, the lines of the image whichare black according to a second predetermined criterion based on theparameter, and for determining a last nonblack line of the current imageby excluding, starting from a last line of the image, the lines of theimage which are black according to the second predetermined criterionbased on the parameter; and second means for automatically reframing thecurrent image before display based on a first nonblack line and a lastnonblack line.
 19. The system according to claim 18, wherein adistribution of the reference pixels in at least one of the lines issubstantially uniform.
 20. The system according to claim 18, wherein adistribution of the reference pixels in at least one of the lines isnonuniform, with more reference pixels being located near the center ofthe line than at the left and/or right ends of the line.
 21. The systemaccording to claim 18, wherein a distribution of the reference pixels isthe same for all of the lines of the current image.
 22. The systemaccording to claim 18, wherein locations of the reference pixels varyover time.
 23. The system according to claim 18, wherein the video is acolor video represented as luminance and chrominance components, and thefirst criterion includes comparing a value of the luminance component ofthe reference pixel with at least one predetermined threshold.
 24. Thesystem according to claim 18, wherein the video is a color videorepresented as luminance and chrominance components, and the firstcriterion includes comparing a value of the luminance component of thereference pixel with at least one first predetermined threshold, andcomparing a value of at least one chrominance component of the referencepixel with at least one second predetermined threshold.
 25. The systemaccording to claim 18, wherein the second criterion includes comparing avalue of the parameter with a predetermined threshold.
 26. The systemaccording to claim 18, wherein the second means reframes the currentimage before display either: on the basis of the first nonblack line andthe last nonblack line of the current image, or on the basis of thefirst nonblack line and the last nonblack line of an earlier image ofthe video if at least one of one or more conditions is not achieved. 27.The system according to claim 26, wherein the one or more conditionsinclude first, second and third conditions, the first condition is thatan average luminance of the current image is less than a predeterminedthreshold, the second condition is that a distance between the firstnonblack line and the last nonblack line of the current image, and thefirst nonblack line and the last nonblack line of the earlier image isless than a first predetermined threshold, and the third condition isthat a distance between the first nonblack line and the last nonblackline of the current image, and the first nonblack line and the lastnonblack line of each of K previous images, is less than a secondpredetermined threshold, where K is a predetermined integer.
 28. Thesystem according to claim 18, further comprising: means for detectingsubtitles in the black lines at the bottom of the image, wherein ifsubtitles are detected, the second means reframes the current imagebefore display on the basis of the first nonblack line and the last lineof the image.